<?php
	
	require_once(dirname(__FILE__)."/../core/safeParam.php");

	$total = $_SESSION['final'];

	$gateway = $_REQUEST['gateway'];
	$cart_order_id = $_GET['oid'];
	
	$results = $database->select("SELECT uid FROM order_sum where id = $cart_order_id");
	$results_user = $database->select("SELECT * FROM users where id = ".$results[0]['uid']."");

	$session_vars['cart_id'] = $cart_order_id ;
	$session_vars['session_content'] = serialize($_SESSION);
	$session_vars['cookie_content'] = serialize($_COOKIE);

	$database->insert_array('session', $session_vars);

	require "modules/gateway/".$gateway."/index.php";

	if($gateway_form != ""){
  		$smarty->assign("gateway_form", $gateway_form);
	}

	if($error != ""){
  		$smarty->assign("error", $error);	
	}
?>
